package com.foreknow.elmboot.controller;

import com.foreknow.elmboot.po.User;
import com.foreknow.elmboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/UserController")
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/getUserByIdByPass")
    public Object listBusinessByTypeId(String userId,String password) {
        User list = userService.getUserByIdByPass(userId,password);
        return list;

    }
    @RequestMapping("/saveUser")
    public Object saveUser(User user) {
        int list = userService.saveUser(user);
        return list;

    }
}
